<template>
	<view class="musichead" :style="{color}">
		<view v-if="icon" class="musichead-icon" :class="{'music-head-iconblack' : iconblack}">
			<text @tap="headtoback" class="iconfont icon-arrow-left-bold"></text> | <text @tap="headtohome" class="iconfont icon-home"></text>
		</view>
		{{title}}
	</view>
</template>

<script>
	import "@/common/iconfont.css";
	export default {
		name:"musichead",
		data() {
			return {
				
			};
		},
		props:["title","icon","color","iconblack"],
		methods:{
			headtoback(){
				uni.navigateBack()
			},
			headtohome(){
				uni.navigateTo({
					url:"../../pages/index/index"
				})
			}
		}
	}
</script>

<style scoped>
	.musichead{
		height: 75px;
		font-size: 16px;
		line-height: 80px;
		text-align: center;
		color: black;
		position: relative;
	}
	.musichead-icon{
		position: absolute;
		left: 8px;
		top: 26px;
		width: 90px;
		height: 30px;
		background: rgba(0,0,0,0.4);
		color: white;
		line-height: 30px;
		border-radius: 15px;
		display: flex; 
		justify-content: space-evenly;
	}
	.music-head-iconblack{color: black;border: 1px #eaeaea solid; background: white;}
</style>
